package com.ict.txmsv2.mapper;

import com.ict.txmsv2.model.SumTime;
import com.ict.txmsv2.model.SumTimeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SumTimeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SumTime record);

    int insertSelective(SumTime record);

    SumTime selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SumTime record);

    int updateByPrimaryKey(SumTime record);

    List<SumTime> getSumTimesForWeek(String begin, String end);


    List<SumTime> getTimeByUserId(@Param("begin") String begin, @Param("end") String end,@Param("userId")Integer userId);

    List<SumTime> getPersonalCIR(@Param("userId") Integer userId, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    List<SumTimeVo> getYearTime(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("page") Integer page, @Param("size") Integer size);

    List<SumTimeVo> getMonthTime(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("page") Integer page, @Param("size") Integer size);

    List<SumTimeVo> getTotalTime(@Param("page") Integer page, @Param("size") Integer size);

    int isExist(@Param("userId")Integer userId,@Param("day") String day);

    SumTime getSumTime(@Param("userId")Integer userId, @Param("day")String day);
}